-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FE] 페어룸 타이머 기능 구현 #114
[FE] 페어룸 타이머 기능 구현 #114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!
리팩터링 할 부분은 이번 스프린트가 끝나고 같이 고민해보는 걸로 해요!
|
||
useEffect(() => { | ||
if (isActive && timeLeft > 0) { | ||
timerRef.current = setInterval(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setInterval로 타이머 시간을 계산하면 큰 오차가 발생할 수도 있어요.
이번 스프린트가 끝난 후, Date를 이용해 현재 시간을 계산하는 로직으로 다시 구현해봐도 좋을 것 같아요! 😁
관련 블로그
border: 0.8rem solid transparent; | ||
border-radius: 50%; | ||
background-image: linear-gradient(white, white), | ||
conic-gradient( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
다만 초 단위로 렌더링되다 보니 애니메이션이 부드럽게 작동하지는 않네요 😢
추후 리팩터링 때 밀리초 단위를 적용하면 더 부드럽게 작동할 수 있겠네요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
역시 타이머 장인 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
연관된 이슈
구현한 기능
상세 설명
DEFAULT_TIME
값을 주어 테스트 진행했습니다.util
파일로 분리해야 할지 고민입니다.